static void gtk_range_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_range_unmap (GtkWidget *widget);
-static void gtk_range_snapshot (GtkWidget *widget,
- GtkSnapshot *snapshot);
static void gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
guint n_press,
widget_class->snapshot = gtk_range_snapshot;
widget_class->size_allocate = gtk_range_size_allocate;
widget_class->unmap = gtk_range_unmap;
- widget_class->snapshot = gtk_range_snapshot;
widget_class->event = gtk_range_event;
widget_class->scroll_event = gtk_range_scroll_event;
widget_class->key_press_event = gtk_range_key_press;
if (priv->has_origin)
gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->highlight_widget, snapshot);
- return gtk_widget_has_visible_focus (widget);
-}
+ gtk_widget_snapshot_child (GTK_WIDGET (gizmo), priv->slider_widget, snapshot);
-static void
-gtk_range_snapshot (GtkWidget *widget,
- GtkSnapshot *snapshot)
-{
- GtkRange *range = GTK_RANGE (widget);
- GtkRangePrivate *priv = range->priv;
- GtkAllocation range_allocation;
- GtkAllocation trough_allocation;
- int x, y;
-
- gtk_widget_snapshot_child (widget, priv->trough_widget, snapshot);
-
- /* Draw the slider last, so that e.g. the focus ring stays below it */
- gtk_widget_get_allocation (widget, &range_allocation);
- gtk_widget_get_content_allocation (priv->trough_widget, &trough_allocation);
-
- x = trough_allocation.x - range_allocation.x;
- y = trough_allocation.y - range_allocation.y;
-
- gtk_snapshot_offset (snapshot, x, y);
- gtk_widget_snapshot_child (priv->trough_widget, priv->slider_widget, snapshot);
- gtk_snapshot_offset (snapshot, -x, -y);
+ return gtk_widget_has_visible_focus (widget);
}
static void